﻿@using InputType = QDT.Common.InputType


@model QDT.Core.Projects.ProjectFeild
           
@{
    ViewBag.Title = "编辑分类字段";
}
<div class="main_title">
    新增 <a href="@Url.Action("FeildList", "ProjectType", new { cid = Model.TypeID })" class="back_list">返回列表</a></div>
<div class="blank5">
</div>
@using (Html.BeginForm("PostEditFeild", "ProjectType"))
{
    @Html.HiddenFor(x=>x.ID)

    <table class="form">
        <tr>
            <td colspan="2" class="topTd"></td>
        </tr>
        <tr>
            <td class="item_title">字段名称:</td>
            <td class="item_input"><input type="text" class="textbox require" name="Name" value="@Model.Name"/></td>
        </tr>
        <tr>
            <td class="item_title">字段显示名称:</td>
            <td class="item_input"><input type="text" class="textbox require" name="ShowName" value="@Model.ShowName"/></td>
        </tr>
        <tr>
            <td class="item_title">字段类型:</td>
            <td class="item_input">
                <select name="InputType">
                    @foreach (var type in InputType.GetTypes())
                    {
                        <option value="@type" @(Model.InputType==type ? "selected=\"selected\"":"")>@InputType.GetName(type)</option>
                    }
                </select>
            </td>
        </tr>
         <tr>
            <td class="item_title">字段值范围:</td>
            <td class="item_input"><input type="text" class="textbox" name="ValueScope" value="@Model.ValueScope"/><span class="tip_span">&nbsp;&nbsp;[多个值之间用英文,号隔开,如：是,否]</span></td>
        </tr>
        <tr>
            <td class="item_title">是否必填:</td>
            <td class="item_input">
                <select  name="IsRequire">
                    <option value="true" @(Model.IsRequire ? "checked=\"checked\"" : "")>是</option>
                    <option value="false" @(!Model.IsRequire ? "checked=\"checked\"" : "")>否</option>
                </select>
            </td>
        </tr>
        <tr>
            <td class="item_title">状态:</td>
            <td class="item_input">
                <label>有效<input type="radio" name="IsEffect" value="true" @(Model.IsEffect ? "checked=\"checked\"" : "") /></label>
                <label>无效<input type="radio" name="IsEffect" value="false" @(Model.IsEffect ? "checked=\"checked\"" : "")/></label>
            </td>
        </tr>
        <tr>
            <td class="item_title">排序:</td>
            <td class="item_input"><input type="text" class="textbox" name="Sort" value="@Model.Sort"/></td>
        </tr>
        <tr>
		    <td class="item_title"></td>
		    <td class="item_input">
			    <!--隐藏元素-->
			    <input type="submit" class="button" value="保存" />
			    <input type="reset" class="button" value="重置" />
		    </td>
	    </tr>
        <tr>
            <td colspan="2" class="bottomTd"></td>
        </tr>
    </table>
}